package com.ruoyi.web.controller.system;

import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.utils.uuid.UUID;
import com.ruoyi.system.domain.Dept;
import com.ruoyi.system.service.IDeptService;
import com.ruoyi.web.controller.tool.JsonResult;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * PageController
 * 
 * @author ruoyi
 * @date 2022-12-08
 */
@Controller
@RequestMapping("/system/page")
public class PageController extends BaseController
{
    private String prefix = "system/demo";

    @GetMapping("/jingfeipici_manage")
    public String jingfeipici_manage()
    {
        return prefix + "/jingfeipici_manage";
    }

    @GetMapping("/jingfeiqueren")
    public String jingfeiqueren()
    {
        return prefix + "/jingfeiqueren";
    }

    @GetMapping("/jingfei_shengfen")
    public String jingfei_shengfen()
    {
        return prefix + "/jingfei_shengfen";
    }

    @GetMapping("/jingfei_danwei")
    public String jingfei_danwei()
    {
        return prefix + "/jingfei_danwei";
    }

    @GetMapping("/jingfei_detail")
    public String jingfei_detail()
    {
        return prefix + "/jingfei_detail";
    }

    @GetMapping("/jingfei_tuikuan")
    public String jingfei_tuikuan()
    {
        return prefix + "/jingfei_tuikuan";
    }

    // 用于批量上传的文件
    @RequestMapping("/upload_batch")
    public String UploadBatch(ModelMap map, HttpServletRequest request) {
        String mmFuJianPath = request.getParameter("fujianpath").toString();
        String mmFileSize = request.getParameter("filesize").toString();
        map.put("filetype", "batch");
        map.put("fujianpath", mmFuJianPath);
        map.put("filesize", mmFileSize);
        return "/system/public/UploadBatch";
    }

    @GetMapping("/banshizhinan")
    public String banshizhinan()
    {
        return "/banshizhinan";
    }


    @GetMapping("/zhengcetongzhi")
    public String zhengcetongzhi()
    {
        return "/zhengcetongzhi";
    }
}
